﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ContentFix : MonoBehaviour {
    public float m_Height;
    public float m_Interval;

    private RectTransform m_content;
    // Use this for initialization
    void Start () {
        m_content = GetComponent<RectTransform>();

    }
	
	// Update is called once per frame
	void Update () {
        float h = (m_Height + m_Interval) * m_content.childCount;
        m_content.sizeDelta = new Vector2(0, h);
    }
}
